package com.xinhua.wuye.dao;

import java.util.ArrayList;
import java.util.List;

import com.xinhua.wuye.bean.Manager;

public class ManagerDAO {
	private List<Manager> managers = new ArrayList<>();
	
	public ManagerDAO() {
		managers.add(new Manager("1000", "123", "张三"));
		managers.add(new Manager("1001", "666", "李四"));
	}
	
	public Manager loginCheck(String id, String password) {
		
		for(Manager manager:managers) {
			if(manager.getId().equals(id)&&manager.getPassword().equals(password)) {
				return manager;
			}
		}
		return null;
	}
	
	
	
}
